<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: H:/project/LibTools/src/socket/internal/TimerInfo.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_9ad1227260954e346101f3844f0abb3d.html">socket</a></li><li class="navelem"><a class="el" href="dir_1865c4ce8b99f52bbeabfd52bfdd7cd3.html">internal</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">TimerInfo.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_timer_info_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef __TIMERINFO_H__</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define __TIMERINFO_H__</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;../SockError.h&quot;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;../SockTools.h&quot;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;../../thread/SharedPtr.h&quot;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;queue&gt;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;set&gt;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; </div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<a class="code" href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160; </div>
<div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="_timer_info_8h.html#a662149968b2610c4dfb4b58da2d0fff9">   11</a></span>&#160;<span class="preprocessor">#define TIMEOUT_TOLERANCE 15</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="class___timer_info__.html">   13</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">class </span><a class="code" href="class___timer_info__.html">_TimerInfo_</a></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;{</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <span class="comment">// tcp服务内部访问字段</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="class___timer_info__.html#a6d2045896b8a0020a780b04906f07604">   17</a></span>&#160;    <a class="code" href="tools_8h.html#adbfeae90dcbc6d1e23fc52bb64339f46">DWORD64</a> <a class="code" href="class___timer_info__.html#a6d2045896b8a0020a780b04906f07604">timekey</a>;</div>
<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="class___timer_info__.html#a3844ac6891ad38d87f1d58ef0153afa9">   18</a></span>&#160;    <a class="code" href="tools_8h.html#a0fd4fe576501753d7573c0b1e623f289">INTPTR_T</a> <a class="code" href="class___timer_info__.html#a3844ac6891ad38d87f1d58ef0153afa9">timeid</a>;</div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="class___timer_info__.html#a06b2f3567dd7e9986346e1a76e59004d">   19</a></span>&#160;    <a class="code" href="class_c_sock_error.html">CSockError</a> <a class="code" href="class___timer_info__.html#a06b2f3567dd7e9986346e1a76e59004d">ec</a>;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="class___timer_info__.html#a26fcfa4280a970bc0b6da9f9e32e5885">   21</a></span>&#160;    <a class="code" href="tools_8h.html#adbfeae90dcbc6d1e23fc52bb64339f46">DWORD64</a> <a class="code" href="class___timer_info__.html#a26fcfa4280a970bc0b6da9f9e32e5885">timeout</a>;</div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="class___timer_info__.html#a4f1e787d37dd946e65956357d9bbfb72">   22</a></span>&#160;    <span class="keywordtype">void</span>* <a class="code" href="class___timer_info__.html#a4f1e787d37dd946e65956357d9bbfb72">timer</a>;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160; </div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="class___timer_info__.html#a5ae5fd6735803b87381fc151cf1bf769">   24</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class___timer_info__.html#a5ae5fd6735803b87381fc151cf1bf769">operator&lt; </a>(<span class="keyword">const</span> <a class="code" href="class___timer_info__.html">_TimerInfo_</a>&amp; t)<span class="keyword"> const</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        <span class="keywordflow">if</span> (this-&gt;timekey &lt; t.<a class="code" href="class___timer_info__.html#a6d2045896b8a0020a780b04906f07604">timekey</a>) <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (this-&gt;timekey == t.<a class="code" href="class___timer_info__.html#a6d2045896b8a0020a780b04906f07604">timekey</a> &amp;&amp;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;            this-&gt;timeid &lt; t.<a class="code" href="class___timer_info__.html#a3844ac6891ad38d87f1d58ef0153afa9">timeid</a>) <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    }</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="class___timer_info__.html#a4493fc7b78e126433ced6e57e8b7e970">   33</a></span>&#160;    <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_time_priority_deque.html">TimePriorityDeque</a>;</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="class___timer_info__.html#a739a37539892b5d12bca29bce7006b7f">   34</a></span>&#160;    <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class___timer_info__.html#a739a37539892b5d12bca29bce7006b7f">CIocpService</a>;</div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="class___timer_info__.html#a34686ee026290581a7ae6fdd82fc618b">   35</a></span>&#160;    <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_c_epoll_service.html">CEpollService</a>;</div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="class___timer_info__.html#ade114c01ea060f18324fb48602147eac">   36</a></span>&#160;    <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_timeout_manager.html">TimeoutManager</a>;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;}<a class="code" href="_timer_info_8h.html#a3cdb46a4463fd5c4c305382491ab3e41">TimerInfo</a>, <a class="code" href="_timer_info_8h.html#a1676b4339a45b948b201694861fe999a">PTimerInfo</a>;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160; </div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="comment">// 超时信息封装</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="class___timeout_info__.html">   40</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">class </span><a class="code" href="class___timeout_info__.html">_TimeoutInfo_</a> : <span class="keyword">public</span> <a class="code" href="_timer_info_8h.html#a3cdb46a4463fd5c4c305382491ab3e41">TimerInfo</a></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;{</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="comment">// 定时器可访问字段</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="class___timeout_info__.html#a75511436e169d4fbb15885d6c83b646a">   44</a></span>&#160;    <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a> <a class="code" href="class___timeout_info__.html#a75511436e169d4fbb15885d6c83b646a">handle</a>;</div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="class___timeout_info__.html#ab87e6474102fccfab419a011948dc677">   45</a></span>&#160;    <span class="keywordtype">void</span>* <a class="code" href="class___timeout_info__.html#ab87e6474102fccfab419a011948dc677">invoker</a>;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="class___timeout_info__.html#a26b076e8319a7d99fb570acaeef3012b">   47</a></span>&#160;    <a class="code" href="class___timeout_info__.html#a26b076e8319a7d99fb570acaeef3012b">_TimeoutInfo_</a>()</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    {</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        <a class="code" href="class___timeout_info__.html#a5fa656e0ef82ad5bc0237771da65761c">Clear</a>();</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    }</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160; </div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="class___timeout_info__.html#abaede1a261838d004b6fae2ef1e2a62d">   52</a></span>&#160;    <a class="code" href="tools_8h.html#adbfeae90dcbc6d1e23fc52bb64339f46">DWORD64</a> <a class="code" href="class___timeout_info__.html#abaede1a261838d004b6fae2ef1e2a62d">GetTimerId</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <span class="keywordflow">return</span> timeid;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    }</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="class___timeout_info__.html#a5fa656e0ef82ad5bc0237771da65761c">   57</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class___timeout_info__.html#a5fa656e0ef82ad5bc0237771da65761c">Clear</a>()</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    {</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        ec.SetError(<a class="code" href="namespace_s_o_c_k_e_t_s_t_a_t_u_s.html#a960fa087f22eb32da3c7d0c805be7876a21f4b3f4919004aed6322dd5435c430c">CSockError::TIMEOUT</a>);</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <a class="code" href="class___timeout_info__.html#a75511436e169d4fbb15885d6c83b646a">handle</a>.<a class="code" href="class_shared_ptr.html#a0b0a4c8396bf40f91994f729855c0a5a">Reset</a>(<a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <a class="code" href="class___timeout_info__.html#ab87e6474102fccfab419a011948dc677">invoker</a> = <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        timekey = 0;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        timeid = (<a class="code" href="tools_8h.html#a0fd4fe576501753d7573c0b1e623f289">INTPTR_T</a>)<span class="keyword">this</span>;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        timeout = 0;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    }</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;}<a class="code" href="_timer_info_8h.html#ad138624af884b17f15fe7c857f59a5c3">TimeoutInfo</a>, *<a class="code" href="_timer_info_8h.html#a1c558cfdd6aa3049687b575f5711b33c">PTimeoutInfo</a>;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160; </div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="class_time_priority_deque.html">   68</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_time_priority_deque.html">TimePriorityDeque</a> :<span class="keyword">public</span> std::set&lt;TimerInfo&gt;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;{</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="class_time_priority_deque.html#a09719a5a760d7eea49930b7c342a34f7">   71</a></span>&#160;    <a class="code" href="class_time_priority_deque.html#a09719a5a760d7eea49930b7c342a34f7">TimePriorityDeque</a>()</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    {</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    }</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160; </div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="class_time_priority_deque.html#ab5f3bf6b8d306b9004dcd73c0712a7e0">   75</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_time_priority_deque.html#ab5f3bf6b8d306b9004dcd73c0712a7e0">DelTimer</a>(<span class="keyword">const</span> <a class="code" href="_timer_info_8h.html#a3cdb46a4463fd5c4c305382491ab3e41">TimerInfo</a>&amp; t)</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    {</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        this-&gt;erase(t);</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    }</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="class_time_priority_deque.html#a3d640f0757205accd83f7f079d81fe51">   80</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_time_priority_deque.html#a3d640f0757205accd83f7f079d81fe51">ExistDelTimer</a>(<span class="keyword">const</span> <a class="code" href="_timer_info_8h.html#a3cdb46a4463fd5c4c305382491ab3e41">TimerInfo</a>&amp; t, <a class="code" href="_timer_info_8h.html#a3cdb46a4463fd5c4c305382491ab3e41">TimerInfo</a>* newt)</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    {</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        TimePriorityDeque::iterator it = this-&gt;find(t);</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <span class="keywordflow">if</span> (it != this-&gt;end())</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        {</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;            this-&gt;erase(it);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;            <span class="keywordflow">if</span> (newt) *newt = *it;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        }</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160; </div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    }</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160; </div>
<div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="class_time_priority_deque.html#ae3c8519c53ca3933a2e2cc76721e5e7f">   93</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_time_priority_deque.html#ae3c8519c53ca3933a2e2cc76721e5e7f">AddTimer</a>(<span class="keyword">const</span> <a class="code" href="_timer_info_8h.html#a3cdb46a4463fd5c4c305382491ab3e41">TimerInfo</a>&amp; t)</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    {</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        this-&gt;insert(t);</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    }</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160; </div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="class_time_priority_deque.html#affc4de48059cb78284c2cad199bcfdc2">   98</a></span>&#160;    <span class="keyword">const</span> <a class="code" href="_timer_info_8h.html#a3cdb46a4463fd5c4c305382491ab3e41">TimerInfo</a>&amp; <a class="code" href="class_time_priority_deque.html#affc4de48059cb78284c2cad199bcfdc2">Top</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        <span class="keywordflow">return</span> *(this-&gt;begin());</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    }</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="class_time_priority_deque.html#aea5946ae19e5637dffcdcc17e655e3ec">  103</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_time_priority_deque.html#aea5946ae19e5637dffcdcc17e655e3ec">Pop</a>()</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    {</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="keywordflow">if</span> (!this-&gt;empty()) {</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;            this-&gt;erase(this-&gt;begin());</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        }</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    }</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;};</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160; </div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="class_timeout_manager.html">  111</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_timeout_manager.html">TimeoutManager</a></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;{</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#abfd4306374d5702bd8f585536aa7cc42">  115</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_timeout_manager.html#abfd4306374d5702bd8f585536aa7cc42">HeadIsTimeout</a>()</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    {</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        <span class="keywordflow">if</span> (!<a class="code" href="class_timeout_manager.html#a2bec164b5eacb7aa1e33e53dcaef1353">_dTimeouts</a>.empty())</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        {</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="class_timeout_manager.html#a2bec164b5eacb7aa1e33e53dcaef1353">_dTimeouts</a>.<a class="code" href="class_time_priority_deque.html#affc4de48059cb78284c2cad199bcfdc2">Top</a>().timekey &lt;= <a class="code" href="_timer_info_8h.html#a662149968b2610c4dfb4b58da2d0fff9">TIMEOUT_TOLERANCE</a>) {</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;                <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;            }</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;            {</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;                <a class="code" href="tools_8h.html#adbfeae90dcbc6d1e23fc52bb64339f46">DWORD64</a> now = <a class="code" href="class_timeout_manager.html#a620f309c8bdeaa47278819e7bf67fda2">GetCurTime</a>();</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;                <span class="comment">// 15ms的偏差</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                <span class="keywordflow">if</span> (now + <a class="code" href="_timer_info_8h.html#a662149968b2610c4dfb4b58da2d0fff9">TIMEOUT_TOLERANCE</a> &gt; <a class="code" href="class_timeout_manager.html#a2bec164b5eacb7aa1e33e53dcaef1353">_dTimeouts</a>.<a class="code" href="class_time_priority_deque.html#affc4de48059cb78284c2cad199bcfdc2">Top</a>().timekey) {</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;                    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;                }</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;            }</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        }</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    }</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160; </div>
<div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#a620f309c8bdeaa47278819e7bf67fda2">  135</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="tools_8h.html#adbfeae90dcbc6d1e23fc52bb64339f46">DWORD64</a> <a class="code" href="class_timeout_manager.html#a620f309c8bdeaa47278819e7bf67fda2">GetCurTime</a>()</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    {</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="namespace_share_api.html#a608cadd04e1c250b35997658e0390cc7">ShareApi::GetTickCount64</a>();</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    }</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160; </div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#a4fb19fc2d6a8980f7e27acbb01ac51b9">  141</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="tools_8h.html#adbfeae90dcbc6d1e23fc52bb64339f46">DWORD64</a> <a class="code" href="class_timeout_manager.html#a4fb19fc2d6a8980f7e27acbb01ac51b9">CalTimerValue</a>(<a class="code" href="tools_8h.html#adbfeae90dcbc6d1e23fc52bb64339f46">DWORD64</a> timekey, <a class="code" href="tools_8h.html#adbfeae90dcbc6d1e23fc52bb64339f46">DWORD64</a> uptime)</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    {</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        <a class="code" href="tools_8h.html#a6a2b55a6391419ed0b7b9da06e094b4b">INT64</a> timer = (<a class="code" href="tools_8h.html#a6a2b55a6391419ed0b7b9da06e094b4b">INT64</a>)timekey - (<a class="code" href="tools_8h.html#a6a2b55a6391419ed0b7b9da06e094b4b">INT64</a>)uptime;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordflow">return</span> (<a class="code" href="tools_8h.html#adbfeae90dcbc6d1e23fc52bb64339f46">DWORD64</a>)(timer &lt; <a class="code" href="_timer_info_8h.html#a662149968b2610c4dfb4b58da2d0fff9">TIMEOUT_TOLERANCE</a> ? <a class="code" href="_timer_info_8h.html#a662149968b2610c4dfb4b58da2d0fff9">TIMEOUT_TOLERANCE</a> : timer);</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    }</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160; </div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#ac2debcd95b4ed624ee0faa6726f82c5a">  148</a></span>&#160;    <a class="code" href="tools_8h.html#adbfeae90dcbc6d1e23fc52bb64339f46">DWORD64</a> <a class="code" href="class_timeout_manager.html#ac2debcd95b4ed624ee0faa6726f82c5a">GetTimerValue</a>()</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    {</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_timeout_manager.html#a4fb19fc2d6a8980f7e27acbb01ac51b9">CalTimerValue</a>(<a class="code" href="class_timeout_manager.html#a2bec164b5eacb7aa1e33e53dcaef1353">_dTimeouts</a>.<a class="code" href="class_time_priority_deque.html#affc4de48059cb78284c2cad199bcfdc2">Top</a>().timekey, <a class="code" href="class_timeout_manager.html#a620f309c8bdeaa47278819e7bf67fda2">GetCurTime</a>());</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    }</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160; </div>
<div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#af2b69c0557fef817257c200fee7d70bb">  154</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_timeout_manager.html#af2b69c0557fef817257c200fee7d70bb">AddTimer</a>(<a class="code" href="_timer_info_8h.html#a3cdb46a4463fd5c4c305382491ab3e41">TimerInfo</a>&amp; t)</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    {</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <span class="keywordflow">if</span> (t.timeout == 0) {</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;            t.timekey = 0;</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        }</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;            t.timekey = t.timeout + <a class="code" href="class_timeout_manager.html#a620f309c8bdeaa47278819e7bf67fda2">GetCurTime</a>();</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;        }</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        <a class="code" href="class_timeout_manager.html#a2bec164b5eacb7aa1e33e53dcaef1353">_dTimeouts</a>.<a class="code" href="class_time_priority_deque.html#ae3c8519c53ca3933a2e2cc76721e5e7f">AddTimer</a>(t);</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    }</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160; </div>
<div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#a2aa7dc241e6703db506dd61489b9a3cc">  166</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_timeout_manager.html#a2aa7dc241e6703db506dd61489b9a3cc">DelTimer</a>(<span class="keyword">const</span> <a class="code" href="_timer_info_8h.html#a3cdb46a4463fd5c4c305382491ab3e41">TimerInfo</a>&amp; t)</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    {</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        <a class="code" href="class_timeout_manager.html#a2bec164b5eacb7aa1e33e53dcaef1353">_dTimeouts</a>.<a class="code" href="class_time_priority_deque.html#ab5f3bf6b8d306b9004dcd73c0712a7e0">DelTimer</a>(t);</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    }</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160; </div>
<div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#a31ac7520afa390b96f6c94a6189e6871">  172</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_timeout_manager.html#a31ac7520afa390b96f6c94a6189e6871">ExistDelTimer</a>(<span class="keyword">const</span> <a class="code" href="_timer_info_8h.html#a3cdb46a4463fd5c4c305382491ab3e41">TimerInfo</a>&amp; t, <a class="code" href="_timer_info_8h.html#a3cdb46a4463fd5c4c305382491ab3e41">TimerInfo</a>* newt)</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    {</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_timeout_manager.html#a2bec164b5eacb7aa1e33e53dcaef1353">_dTimeouts</a>.<a class="code" href="class_time_priority_deque.html#a3d640f0757205accd83f7f079d81fe51">ExistDelTimer</a>(t, newt);</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    }</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160; </div>
<div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#a3e275bf35a2191a21bbf958fd5ccaa30">  177</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_timeout_manager.html#a3e275bf35a2191a21bbf958fd5ccaa30">SetCurWaitTimeValue</a>(<a class="code" href="tools_8h.html#adbfeae90dcbc6d1e23fc52bb64339f46">DWORD64</a> timeout)</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    {</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        <a class="code" href="class_timeout_manager.html#ab1bacadf5a2ae5180e8a68a62e94d00a">_curWaitTime</a> = timeout;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    }</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#a26337b88b66923caff1afbb69b297416">  183</a></span>&#160;    <a class="code" href="tools_8h.html#adbfeae90dcbc6d1e23fc52bb64339f46">DWORD64</a> <a class="code" href="class_timeout_manager.html#a26337b88b66923caff1afbb69b297416">GetCurWaitTimeValue</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_timeout_manager.html#ab1bacadf5a2ae5180e8a68a62e94d00a">_curWaitTime</a>;</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    }</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160; </div>
<div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#a2a1c4861763911bd7c1f9ab2f4bd6b5e">  189</a></span>&#160;    <span class="keyword">const</span> <a class="code" href="_timer_info_8h.html#a3cdb46a4463fd5c4c305382491ab3e41">TimerInfo</a>&amp; <a class="code" href="class_timeout_manager.html#a2a1c4861763911bd7c1f9ab2f4bd6b5e">Top</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_timeout_manager.html#a2bec164b5eacb7aa1e33e53dcaef1353">_dTimeouts</a>.<a class="code" href="class_time_priority_deque.html#affc4de48059cb78284c2cad199bcfdc2">Top</a>();</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    }</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160; </div>
<div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#ab699bfb8507e734ed4befedebe300ac9">  195</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_timeout_manager.html#ab699bfb8507e734ed4befedebe300ac9">Pop</a>()</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    {</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        <a class="code" href="class_timeout_manager.html#a2bec164b5eacb7aa1e33e53dcaef1353">_dTimeouts</a>.<a class="code" href="class_time_priority_deque.html#aea5946ae19e5637dffcdcc17e655e3ec">Pop</a>();</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    }</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160; </div>
<div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#ad1b59c1d0934ec1f93deabaf96d725b6">  201</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_timeout_manager.html#ad1b59c1d0934ec1f93deabaf96d725b6">Empty</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_timeout_manager.html#a2bec164b5eacb7aa1e33e53dcaef1353">_dTimeouts</a>.empty();</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    }</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160; </div>
<div class="line"><a name="l00207"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#afcc839b5afb4301bf4cfb8a4f1c0e7c5">  207</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_timeout_manager.html#afcc839b5afb4301bf4cfb8a4f1c0e7c5">Clear</a>()</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    {</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;        <a class="code" href="class_timeout_manager.html#a2bec164b5eacb7aa1e33e53dcaef1353">_dTimeouts</a>.clear();</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;        <a class="code" href="class_timeout_manager.html#ab1bacadf5a2ae5180e8a68a62e94d00a">_curWaitTime</a> = <a class="code" href="tools_8h.html#aa84a29002ab81c719c0d07bb446296e0">INFINITE</a>;</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    }</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160; </div>
<div class="line"><a name="l00214"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#a461f91ab5d96160b2d54362d92f83b1f">  214</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="class_timeout_manager.html#a461f91ab5d96160b2d54362d92f83b1f">Size</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_timeout_manager.html#a2bec164b5eacb7aa1e33e53dcaef1353">_dTimeouts</a>.size();</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    }</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160; </div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    <span class="comment">// 超时队列</span></div>
<div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#a2bec164b5eacb7aa1e33e53dcaef1353">  221</a></span>&#160;    <a class="code" href="class_time_priority_deque.html">TimePriorityDeque</a> <a class="code" href="class_timeout_manager.html#a2bec164b5eacb7aa1e33e53dcaef1353">_dTimeouts</a>;</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160; </div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    <span class="comment">// 当前计时器时间刻度</span></div>
<div class="line"><a name="l00224"></a><span class="lineno"><a class="line" href="class_timeout_manager.html#ab1bacadf5a2ae5180e8a68a62e94d00a">  224</a></span>&#160;    <a class="code" href="tools_8h.html#adbfeae90dcbc6d1e23fc52bb64339f46">DWORD64</a> <a class="code" href="class_timeout_manager.html#ab1bacadf5a2ae5180e8a68a62e94d00a">_curWaitTime</a>;</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;};</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160; </div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;<a class="code" href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160; </div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclass_timeout_manager_html_abfd4306374d5702bd8f585536aa7cc42"><div class="ttname"><a href="class_timeout_manager.html#abfd4306374d5702bd8f585536aa7cc42">TimeoutManager::HeadIsTimeout</a></div><div class="ttdeci">bool HeadIsTimeout()</div><div class="ttdoc">判断最小一个超时值是否超时</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00115">TimerInfo.h:115</a></div></div>
<div class="ttc" id="aclass_time_priority_deque_html_aea5946ae19e5637dffcdcc17e655e3ec"><div class="ttname"><a href="class_time_priority_deque.html#aea5946ae19e5637dffcdcc17e655e3ec">TimePriorityDeque::Pop</a></div><div class="ttdeci">void Pop()</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00103">TimerInfo.h:103</a></div></div>
<div class="ttc" id="aclass_timeout_manager_html_a26337b88b66923caff1afbb69b297416"><div class="ttname"><a href="class_timeout_manager.html#a26337b88b66923caff1afbb69b297416">TimeoutManager::GetCurWaitTimeValue</a></div><div class="ttdeci">DWORD64 GetCurWaitTimeValue() const</div><div class="ttdoc">获取当前定时器设置的时间</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00183">TimerInfo.h:183</a></div></div>
<div class="ttc" id="aclass_timeout_manager_html"><div class="ttname"><a href="class_timeout_manager.html">TimeoutManager</a></div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00111">TimerInfo.h:111</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html"><div class="ttname"><a href="class_c_sock_error.html">CSockError</a></div><div class="ttdoc">套接字错误信息类</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00013">SockError.h:13</a></div></div>
<div class="ttc" id="aclass___timer_info___html"><div class="ttname"><a href="class___timer_info__.html">_TimerInfo_</a></div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00013">TimerInfo.h:13</a></div></div>
<div class="ttc" id="anamespace_share_api_html_a608cadd04e1c250b35997658e0390cc7"><div class="ttname"><a href="namespace_share_api.html#a608cadd04e1c250b35997658e0390cc7">ShareApi::GetTickCount64</a></div><div class="ttdeci">LIBTOOLS DWORD64 GetTickCount64()</div><div class="ttdef"><b>Definition:</b> <a href="_share_api_8cpp_source.html#l01828">ShareApi.cpp:1828</a></div></div>
<div class="ttc" id="aclass___timer_info___html_a739a37539892b5d12bca29bce7006b7f"><div class="ttname"><a href="class___timer_info__.html#a739a37539892b5d12bca29bce7006b7f">_TimerInfo_::CIocpService</a></div><div class="ttdeci">friend class CIocpService</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00034">TimerInfo.h:34</a></div></div>
<div class="ttc" id="aclass___timeout_info___html_abaede1a261838d004b6fae2ef1e2a62d"><div class="ttname"><a href="class___timeout_info__.html#abaede1a261838d004b6fae2ef1e2a62d">_TimeoutInfo_::GetTimerId</a></div><div class="ttdeci">DWORD64 GetTimerId() const</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00052">TimerInfo.h:52</a></div></div>
<div class="ttc" id="aclass_time_priority_deque_html_ab5f3bf6b8d306b9004dcd73c0712a7e0"><div class="ttname"><a href="class_time_priority_deque.html#ab5f3bf6b8d306b9004dcd73c0712a7e0">TimePriorityDeque::DelTimer</a></div><div class="ttdeci">void DelTimer(const TimerInfo &amp;t)</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00075">TimerInfo.h:75</a></div></div>
<div class="ttc" id="aclass___timeout_info___html_ab87e6474102fccfab419a011948dc677"><div class="ttname"><a href="class___timeout_info__.html#ab87e6474102fccfab419a011948dc677">_TimeoutInfo_::invoker</a></div><div class="ttdeci">void * invoker</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00045">TimerInfo.h:45</a></div></div>
<div class="ttc" id="aclass_time_priority_deque_html_ae3c8519c53ca3933a2e2cc76721e5e7f"><div class="ttname"><a href="class_time_priority_deque.html#ae3c8519c53ca3933a2e2cc76721e5e7f">TimePriorityDeque::AddTimer</a></div><div class="ttdeci">void AddTimer(const TimerInfo &amp;t)</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00093">TimerInfo.h:93</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html"><div class="ttname"><a href="class_shared_ptr.html">SharedPtr&lt; HandleBase &gt;</a></div></div>
<div class="ttc" id="atools_8h_html_adbfeae90dcbc6d1e23fc52bb64339f46"><div class="ttname"><a href="tools_8h.html#adbfeae90dcbc6d1e23fc52bb64339f46">DWORD64</a></div><div class="ttdeci">unsigned long long DWORD64</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00135">tools.h:135</a></div></div>
<div class="ttc" id="a_timer_info_8h_html_a662149968b2610c4dfb4b58da2d0fff9"><div class="ttname"><a href="_timer_info_8h.html#a662149968b2610c4dfb4b58da2d0fff9">TIMEOUT_TOLERANCE</a></div><div class="ttdeci">#define TIMEOUT_TOLERANCE</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00011">TimerInfo.h:11</a></div></div>
<div class="ttc" id="aclass_timeout_manager_html_ac2debcd95b4ed624ee0faa6726f82c5a"><div class="ttname"><a href="class_timeout_manager.html#ac2debcd95b4ed624ee0faa6726f82c5a">TimeoutManager::GetTimerValue</a></div><div class="ttdeci">DWORD64 GetTimerValue()</div><div class="ttdoc">获取下一个超时值</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00148">TimerInfo.h:148</a></div></div>
<div class="ttc" id="aclass_timeout_manager_html_ab1bacadf5a2ae5180e8a68a62e94d00a"><div class="ttname"><a href="class_timeout_manager.html#ab1bacadf5a2ae5180e8a68a62e94d00a">TimeoutManager::_curWaitTime</a></div><div class="ttdeci">DWORD64 _curWaitTime</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00224">TimerInfo.h:224</a></div></div>
<div class="ttc" id="atools_8h_html_a201ce692c9dca6599e5c12d00167419b"><div class="ttname"><a href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div><div class="ttdeci">#define DEF_BEG_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00036">tools.h:36</a></div></div>
<div class="ttc" id="atools_8h_html_aa84a29002ab81c719c0d07bb446296e0"><div class="ttname"><a href="tools_8h.html#aa84a29002ab81c719c0d07bb446296e0">INFINITE</a></div><div class="ttdeci">#define INFINITE</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00159">tools.h:159</a></div></div>
<div class="ttc" id="aclass_timeout_manager_html_a31ac7520afa390b96f6c94a6189e6871"><div class="ttname"><a href="class_timeout_manager.html#a31ac7520afa390b96f6c94a6189e6871">TimeoutManager::ExistDelTimer</a></div><div class="ttdeci">bool ExistDelTimer(const TimerInfo &amp;t, TimerInfo *newt)</div><div class="ttdoc">判断定时器是否存，若存在则删除</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00172">TimerInfo.h:172</a></div></div>
<div class="ttc" id="aclass___timeout_info___html_a75511436e169d4fbb15885d6c83b646a"><div class="ttname"><a href="class___timeout_info__.html#a75511436e169d4fbb15885d6c83b646a">_TimeoutInfo_::handle</a></div><div class="ttdeci">SharedPtr&lt; HandleBase &gt; handle</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00044">TimerInfo.h:44</a></div></div>
<div class="ttc" id="aclass___timeout_info___html"><div class="ttname"><a href="class___timeout_info__.html">_TimeoutInfo_</a></div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00040">TimerInfo.h:40</a></div></div>
<div class="ttc" id="aclass_time_priority_deque_html_a3d640f0757205accd83f7f079d81fe51"><div class="ttname"><a href="class_time_priority_deque.html#a3d640f0757205accd83f7f079d81fe51">TimePriorityDeque::ExistDelTimer</a></div><div class="ttdeci">bool ExistDelTimer(const TimerInfo &amp;t, TimerInfo *newt)</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00080">TimerInfo.h:80</a></div></div>
<div class="ttc" id="aclass___timeout_info___html_a26b076e8319a7d99fb570acaeef3012b"><div class="ttname"><a href="class___timeout_info__.html#a26b076e8319a7d99fb570acaeef3012b">_TimeoutInfo_::_TimeoutInfo_</a></div><div class="ttdeci">_TimeoutInfo_()</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00047">TimerInfo.h:47</a></div></div>
<div class="ttc" id="aclass_c_epoll_service_html"><div class="ttname"><a href="class_c_epoll_service.html">CEpollService</a></div><div class="ttdef"><b>Definition:</b> <a href="_epoll_service_8h_source.html#l00023">EpollService.h:23</a></div></div>
<div class="ttc" id="aclass_timeout_manager_html_a620f309c8bdeaa47278819e7bf67fda2"><div class="ttname"><a href="class_timeout_manager.html#a620f309c8bdeaa47278819e7bf67fda2">TimeoutManager::GetCurTime</a></div><div class="ttdeci">static DWORD64 GetCurTime()</div><div class="ttdoc">获取当前时间</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00135">TimerInfo.h:135</a></div></div>
<div class="ttc" id="aclass_timeout_manager_html_ab699bfb8507e734ed4befedebe300ac9"><div class="ttname"><a href="class_timeout_manager.html#ab699bfb8507e734ed4befedebe300ac9">TimeoutManager::Pop</a></div><div class="ttdeci">void Pop()</div><div class="ttdoc">删除队列中最小的一个定时器</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00195">TimerInfo.h:195</a></div></div>
<div class="ttc" id="aclass___timer_info___html_a5ae5fd6735803b87381fc151cf1bf769"><div class="ttname"><a href="class___timer_info__.html#a5ae5fd6735803b87381fc151cf1bf769">_TimerInfo_::operator&lt;</a></div><div class="ttdeci">bool operator&lt;(const _TimerInfo_ &amp;t) const</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00024">TimerInfo.h:24</a></div></div>
<div class="ttc" id="aclass_timeout_manager_html_a2a1c4861763911bd7c1f9ab2f4bd6b5e"><div class="ttname"><a href="class_timeout_manager.html#a2a1c4861763911bd7c1f9ab2f4bd6b5e">TimeoutManager::Top</a></div><div class="ttdeci">const TimerInfo &amp; Top() const</div><div class="ttdoc">返回队列中最小的一个定时器</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00189">TimerInfo.h:189</a></div></div>
<div class="ttc" id="atools_8h_html_ac909db71799bb22cb7d636a34cd785e4"><div class="ttname"><a href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div><div class="ttdeci">#define DEF_END_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00038">tools.h:38</a></div></div>
<div class="ttc" id="a_timer_info_8h_html_a1676b4339a45b948b201694861fe999a"><div class="ttname"><a href="_timer_info_8h.html#a1676b4339a45b948b201694861fe999a">PTimerInfo</a></div><div class="ttdeci">class _TimerInfo_ PTimerInfo</div></div>
<div class="ttc" id="aclass___timer_info___html_a4f1e787d37dd946e65956357d9bbfb72"><div class="ttname"><a href="class___timer_info__.html#a4f1e787d37dd946e65956357d9bbfb72">_TimerInfo_::timer</a></div><div class="ttdeci">void * timer</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00022">TimerInfo.h:22</a></div></div>
<div class="ttc" id="aclass_time_priority_deque_html_affc4de48059cb78284c2cad199bcfdc2"><div class="ttname"><a href="class_time_priority_deque.html#affc4de48059cb78284c2cad199bcfdc2">TimePriorityDeque::Top</a></div><div class="ttdeci">const TimerInfo &amp; Top() const</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00098">TimerInfo.h:98</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html_a0b0a4c8396bf40f91994f729855c0a5a"><div class="ttname"><a href="class_shared_ptr.html#a0b0a4c8396bf40f91994f729855c0a5a">SharedPtr::Reset</a></div><div class="ttdeci">void Reset(Ty *p)</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00175">SharedPtr.h:175</a></div></div>
<div class="ttc" id="a_timer_info_8h_html_a3cdb46a4463fd5c4c305382491ab3e41"><div class="ttname"><a href="_timer_info_8h.html#a3cdb46a4463fd5c4c305382491ab3e41">TimerInfo</a></div><div class="ttdeci">class _TimerInfo_ TimerInfo</div></div>
<div class="ttc" id="aclass___timeout_info___html_a5fa656e0ef82ad5bc0237771da65761c"><div class="ttname"><a href="class___timeout_info__.html#a5fa656e0ef82ad5bc0237771da65761c">_TimeoutInfo_::Clear</a></div><div class="ttdeci">void Clear()</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00057">TimerInfo.h:57</a></div></div>
<div class="ttc" id="aclass_timeout_manager_html_afcc839b5afb4301bf4cfb8a4f1c0e7c5"><div class="ttname"><a href="class_timeout_manager.html#afcc839b5afb4301bf4cfb8a4f1c0e7c5">TimeoutManager::Clear</a></div><div class="ttdeci">void Clear()</div><div class="ttdoc">清空所有定时器</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00207">TimerInfo.h:207</a></div></div>
<div class="ttc" id="atools_8h_html_a0fd4fe576501753d7573c0b1e623f289"><div class="ttname"><a href="tools_8h.html#a0fd4fe576501753d7573c0b1e623f289">INTPTR_T</a></div><div class="ttdeci">#define INTPTR_T</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00234">tools.h:234</a></div></div>
<div class="ttc" id="aclass_timeout_manager_html_a461f91ab5d96160b2d54362d92f83b1f"><div class="ttname"><a href="class_timeout_manager.html#a461f91ab5d96160b2d54362d92f83b1f">TimeoutManager::Size</a></div><div class="ttdeci">size_t Size() const</div><div class="ttdoc">返回定时器的数量</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00214">TimerInfo.h:214</a></div></div>
<div class="ttc" id="aclass_timeout_manager_html_a4fb19fc2d6a8980f7e27acbb01ac51b9"><div class="ttname"><a href="class_timeout_manager.html#a4fb19fc2d6a8980f7e27acbb01ac51b9">TimeoutManager::CalTimerValue</a></div><div class="ttdeci">static DWORD64 CalTimerValue(DWORD64 timekey, DWORD64 uptime)</div><div class="ttdoc">重新计算超时值</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00141">TimerInfo.h:141</a></div></div>
<div class="ttc" id="aclass_timeout_manager_html_a3e275bf35a2191a21bbf958fd5ccaa30"><div class="ttname"><a href="class_timeout_manager.html#a3e275bf35a2191a21bbf958fd5ccaa30">TimeoutManager::SetCurWaitTimeValue</a></div><div class="ttdeci">void SetCurWaitTimeValue(DWORD64 timeout)</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00177">TimerInfo.h:177</a></div></div>
<div class="ttc" id="aclass_timeout_manager_html_ad1b59c1d0934ec1f93deabaf96d725b6"><div class="ttname"><a href="class_timeout_manager.html#ad1b59c1d0934ec1f93deabaf96d725b6">TimeoutManager::Empty</a></div><div class="ttdeci">bool Empty() const</div><div class="ttdoc">判断定时器队列是否为空</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00201">TimerInfo.h:201</a></div></div>
<div class="ttc" id="anamespace_s_o_c_k_e_t_s_t_a_t_u_s_html_a960fa087f22eb32da3c7d0c805be7876a21f4b3f4919004aed6322dd5435c430c"><div class="ttname"><a href="namespace_s_o_c_k_e_t_s_t_a_t_u_s.html#a960fa087f22eb32da3c7d0c805be7876a21f4b3f4919004aed6322dd5435c430c">SOCKETSTATUS::TIMEOUT</a></div><div class="ttdoc">请求超时</div><div class="ttdef"><b>Definition:</b> <a href="_socket_def_8h_source.html#l00102">SocketDef.h:102</a></div></div>
<div class="ttc" id="aclass___timer_info___html_a6d2045896b8a0020a780b04906f07604"><div class="ttname"><a href="class___timer_info__.html#a6d2045896b8a0020a780b04906f07604">_TimerInfo_::timekey</a></div><div class="ttdeci">DWORD64 timekey</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00017">TimerInfo.h:17</a></div></div>
<div class="ttc" id="aclass___timer_info___html_a06b2f3567dd7e9986346e1a76e59004d"><div class="ttname"><a href="class___timer_info__.html#a06b2f3567dd7e9986346e1a76e59004d">_TimerInfo_::ec</a></div><div class="ttdeci">CSockError ec</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00019">TimerInfo.h:19</a></div></div>
<div class="ttc" id="atools_8h_html_ab689500aaec0db066e3ac9483d3fe425"><div class="ttname"><a href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a></div><div class="ttdeci">#define NullPtr</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00119">tools.h:119</a></div></div>
<div class="ttc" id="a_timer_info_8h_html_a1c558cfdd6aa3049687b575f5711b33c"><div class="ttname"><a href="_timer_info_8h.html#a1c558cfdd6aa3049687b575f5711b33c">PTimeoutInfo</a></div><div class="ttdeci">_TimeoutInfo_ * PTimeoutInfo</div></div>
<div class="ttc" id="aclass___timer_info___html_a26fcfa4280a970bc0b6da9f9e32e5885"><div class="ttname"><a href="class___timer_info__.html#a26fcfa4280a970bc0b6da9f9e32e5885">_TimerInfo_::timeout</a></div><div class="ttdeci">DWORD64 timeout</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00021">TimerInfo.h:21</a></div></div>
<div class="ttc" id="aclass_time_priority_deque_html_a09719a5a760d7eea49930b7c342a34f7"><div class="ttname"><a href="class_time_priority_deque.html#a09719a5a760d7eea49930b7c342a34f7">TimePriorityDeque::TimePriorityDeque</a></div><div class="ttdeci">TimePriorityDeque()</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00071">TimerInfo.h:71</a></div></div>
<div class="ttc" id="aclass_timeout_manager_html_af2b69c0557fef817257c200fee7d70bb"><div class="ttname"><a href="class_timeout_manager.html#af2b69c0557fef817257c200fee7d70bb">TimeoutManager::AddTimer</a></div><div class="ttdeci">void AddTimer(TimerInfo &amp;t)</div><div class="ttdoc">增加定时器</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00154">TimerInfo.h:154</a></div></div>
<div class="ttc" id="aclass_timeout_manager_html_a2aa7dc241e6703db506dd61489b9a3cc"><div class="ttname"><a href="class_timeout_manager.html#a2aa7dc241e6703db506dd61489b9a3cc">TimeoutManager::DelTimer</a></div><div class="ttdeci">void DelTimer(const TimerInfo &amp;t)</div><div class="ttdoc">删除定时器</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00166">TimerInfo.h:166</a></div></div>
<div class="ttc" id="aclass___timer_info___html_a3844ac6891ad38d87f1d58ef0153afa9"><div class="ttname"><a href="class___timer_info__.html#a3844ac6891ad38d87f1d58ef0153afa9">_TimerInfo_::timeid</a></div><div class="ttdeci">INTPTR_T timeid</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00018">TimerInfo.h:18</a></div></div>
<div class="ttc" id="a_timer_info_8h_html_ad138624af884b17f15fe7c857f59a5c3"><div class="ttname"><a href="_timer_info_8h.html#ad138624af884b17f15fe7c857f59a5c3">TimeoutInfo</a></div><div class="ttdeci">_TimeoutInfo_ TimeoutInfo</div></div>
<div class="ttc" id="aclass_timeout_manager_html_a2bec164b5eacb7aa1e33e53dcaef1353"><div class="ttname"><a href="class_timeout_manager.html#a2bec164b5eacb7aa1e33e53dcaef1353">TimeoutManager::_dTimeouts</a></div><div class="ttdeci">TimePriorityDeque _dTimeouts</div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00221">TimerInfo.h:221</a></div></div>
<div class="ttc" id="atools_8h_html_a6a2b55a6391419ed0b7b9da06e094b4b"><div class="ttname"><a href="tools_8h.html#a6a2b55a6391419ed0b7b9da06e094b4b">INT64</a></div><div class="ttdeci">long long INT64</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00132">tools.h:132</a></div></div>
<div class="ttc" id="aclass_time_priority_deque_html"><div class="ttname"><a href="class_time_priority_deque.html">TimePriorityDeque</a></div><div class="ttdef"><b>Definition:</b> <a href="_timer_info_8h_source.html#l00068">TimerInfo.h:68</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
